// SGJ Apps Bible Input Method (BibleIM).  A collection
// of Java InputMethods enabling the easy typing of Biblical scripts.
// Copyright (C) 2007-2008 Steffen G. Jenkins  

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

// This file is based on the following source file.
/*
Brahmi Kannada Input Method
http://brahmi.sourceforge.net
Copyright (C) 2002  Harsha P Ravnikar <harsha_pr@users.sourcefourge.net>
This file is a part of Brahmi Kannada Input Method

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

package uk.org.sgj.BibleIM;

import java.awt.Image;
import java.awt.im.spi.InputMethod;
import java.awt.im.spi.InputMethodDescriptor;
import java.util.Locale;

public abstract class HebrewInputMethodDescriptor implements InputMethodDescriptor {

	static final Locale HEBREWUK = new Locale("he", "IL", "uk");
	static final Locale HEBREWUS = new Locale("bb", "BB", "us");
	protected static final char KGPkeyboardMap[] = 
        {
        	'\0',     /*00*/
		'\001',   /*01*/
		'\002',   /*02*/
		'\003',   /*03*/
		'\004',   /*04*/
		'\005',   /*05*/
		'\006',   /*06*/
		'\007',   /*07*/
		'\b',     /*08*/
		'\t',     /*09*/
		'\n',     /*10*/
		'\013',   /*11*/
		'\f',     /*12*/
		'\r',     /*13*/
		'\016',   /*14*/
		'\017',   /*15*/
		'\020',   /*16*/
		'\021',   /*17*/
		'\022',   /*18*/
		'\023',   /*19*/
		'\024',   /*20*/
		'\025',   /*21*/
		'\026',   /*22*/
		'\027',   /*23*/
		'\030',   /*24*/
		'\031',   /*25*/
		'\032',   /*26*/
		'\033',   /*27*/
		'\034',   /*28*/
		'\035',   /*29*/
		'\036',   /*30*/
		'\037',   /*31*/
		' ',      /*32*/
                
                
		'\u05A9',      /*33 ! tel. qetana*/
		'\u05B7',      /*34 " patah */
		'\u0592',      /*35 # segolta*/  // XXX check this
		'\u05AF',      /*36 $ masora c.*/
		'\u05BA',      /*37 % hol. for vav*/
		'\u05BF',      /*38 & rafe */
		'\u059A',      /*39 ' yetiv */
		'\u05C1',      /*40 ( shin dot*/
		'\u059D',      /*41 ) g. muqdam */
		'\u05C2',      /*42 * sin dot */
		'\u05BC',      /*43 + dagesh*/
		'\u05EA',      /*44 , tav*/
		'\u05BE',      /*45 -  maqaf*/
		'\u05E5',      /*46 . final tsadi*/
		'\u05AD',      /*47 / dehi*/
		'0', /*48 0*/
		'1', /*49 1*/
		'2', /*50 2*/
		'3', /*51 3*/
		'4', /*52 4*/
		'5', /*53 5*/
		'6', /*54 6*/
		'7', /*55 7*/
		'8', /*56 8*/
		'9', /*57 9*/
		'\u05B2',      /*58 : hat. patah */
		'\u05E3',      /*59 ; final pe*/
		'\u0591',      /*60 < atnah */
		'\u25E6',      /*61 = bullet*/
		'\u0596',      /*62 > tipeha*/
		'\u05A3',      /*63 ? munah */
		'\u0599',      /*64 @ pashta */
                
                // CAPITALS HERE DESPITE WHAT IT SAYS
		'\u05BD', /*97 a meteg*/  
		'\u05A5', /*98 b merkha */
		'\u05AA', /*99 c yer. benyomo*/
		'\u05BB', /*100 d qubuts*/
		'\u05AB', /*101 e ole*/
		'\u05B4', /*102 f hiriq*/
		'\u05B1', /*103 g hat. segol*/
		'\u05B6', /*104 h segol*/
		'\u05A1', /*105 i pazer*/
		'\u05B5', /*106 j tsere*/
		'\u05B3', /*107 k hat. qamats*/
		'\u05B8', /*108 l qamats*/
		'\u059B', /*109 m tevir*/
		'\u05A7', /*110 n darga*/
		'\u0595', /*111 o zaq. gadol*/
		'\u0594', /*112 p zaq. qatan*/
		'\u05C4', /*113 q punctum*/
		'\u059F', /*114 r qar. para*/
		'\u05B0', /*115 s sheva*/
		'\u0593', /*116 t shalshelet*/
		'\u059C', /*117 u geresh*/
		'\u05A6', /*118 v mer. kefula */
		'\u05AC', /*119 w iluy*/
		'\u05A4', /*120 x mahpakh*/
		'\u059E', /*121 y gershayim*/
		'\u05C5', /*122 z punctum*/ // XXX broken
                
		'\u005D',      /*91 [ bracket */
		'\u05C0',     /*92 \  paseq*/
		'\u005B',      /*93 ] bracket */
                
		'\u05B9',      /*94 ^ holam above number 6*/
		'\u05A0',      /*95 _ tel. gedola to the right of number 0*/
		'\u05C3',      /*96 `  sof pasuq*/
                
                // LOWER CASE HERE DESPITE WHAT IT SAYS
		'\u05E9', /*65 A shin*/
		'\u05E0', /*66 B nun*/
		'\u05D1', /*67 C bet*/
		'\u05D2', /*68 D gimel*/
		'\u05E7', /*69 E qof*/
		'\u05DB', /*70 F kaf*/ 
		'\u05E2', /*71 G ayin*/
		'\u05D9', /*72 H yod*/
		'\u05DF', /*73 I final nun*/
		'\u05D7', /*74 J het*/
		'\u05DC', /*75 K lamed*/
		'\u05DA', /*76 L final kaf*/
		'\u05E6', /*77 M tsadi*/
		'\u05DE', /*78 N mem*/
		'\u05DD', /*79 O final mem*/
		'\u05E4', /*80 P pe*/
		'\u0307', /*81 Q masora dot*/
		'\u05E8', /*82 R resh*/
		'\u05D3', /*83 S dalet*/
		'\u05D0', /*84 T alef*/
		'\u05D5', /*85 U vav*/
		'\u05D4', /*86 V he*/
		'\u05F3', /*87 W geresh p. */
		'\u05E1', /*88 X samekh */
		'\u05D8', /*89 Y tet */
		'\u05D6', /*90 Z zayin */
                
		'\u0597',      /*123 revia */
		'\u05A8',      /*124 qadma */
		'\u0598',      /*125 zarqa*/
		'\u05AE',      /*126 ~ zinor */
		'\177'   /*127 DEL*/
	};
        
	public HebrewInputMethodDescriptor(){
	}


	public boolean hasDynamicLocaleList() {
		return false;
	}

	public Image getInputMethodIcon(Locale locale) {
		return null;
	}

	public String toString() {
		return getClass().getName();
	}
}
